#!/usr/local/bin/python3.6
#-*-coding=utf-8-*-

from http.server import HTTPServer,CGIHTTPRequestHandler

port = 80

httpd = HTTPServer(('',port),CGIHTTPRequestHandler)

print('Starting simple httpd on port:'+str(httpd.server_port))
httpd.serve_forever()



#!/usr/local/bin/python3.6 这句话非常重要，如果目录指定不对，会提示无法找到http.server这个模块